package com.tech.consumer.client;

import com.tech.consumer.fallback.XxxFeignClientFallback;
import com.tech.entity.SystemResult;
import com.tech.entity.user.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "XXX-Service-Provider", fallback = XxxFeignClientFallback.class)
@Component
public interface XxxFeignClient {

    @RequestMapping(value = "/XXX/{id}/{name}", method = RequestMethod.GET)
    public SystemResult<User> getUserByParam(@PathVariable("id")  Integer id, @PathVariable("name") String name);

    @RequestMapping(value="/XXX/getUser", method = RequestMethod.POST)
    public SystemResult<User> getUser(@RequestBody User user);
}
